# coding=utf-8
from pyspark.sql import SparkSession

if __name__ == "__main__":
    spark = SparkSession.builder.appName("Spark App").getOrCreate()

    df=spark.read.csv("../data/attribute.csv",sep=",",header=True
                      ,inferSchema=True)

    # df.printSchema()
    df.show()

    df.registerTempTable("attribute_table")
    spark.sql("select * from attribute_table where prod_id='-'").show()

    df.where("prod_id='-'").limit(2).show()
